package cz.none.bezbarier.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import cz.none.bezbarier.web.service.PlaceService;
import cz.none.bezbarier.web.util.Constants;

@Controller
public class PlaceController extends AController {

	@Autowired
	private PlaceService service;

	@RequestMapping(Constants.Page.MAP_M)
	public String renderMap(Model model) {
		setActiveMenu(model, Constants.Menu.MAP);
		model.addAttribute("places", service.getPlaces());

		return Constants.Page.MAP;
	}
}
